<?

	function getpassword($id) 
	// returns corresponding password string of $id
	// returns null if there is no id like $id
	{
		$query = "select password from users where id= '".$id."'";
		$result = mysql_query($query);
		$num_results = mysql_num_rows($result);

		if($num_results ==0){
			$password = null;
		}
		else {
			$row = mysql_fetch_array($result);
			$password = $row["password"];
		}
		return $password;
	} // end of function getpassword


function connectDB(){

// db connection

	$db = mysql_pconnect("localhost", "palhunt", "palhunt");
	if (!$db){
		echo "Error : Could not connect to database."; 
		exit;
	}
	mysql_select_db("PalHunt");
// end of db connection

}


?>

